summaryrefslogtreecommitdiff
path: root/src/pages/[locale]/not-found.astro
blob: 3b45ba09c23e68f5795bdce912c84a22586112e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
import translate from '$i18n/translate';
import tPage from '$i18n/translations/pages/404';
import Page from '$layouts/Page.astro';
import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import localeStaticPaths from '$lib/localeStaticPaths';

export async function getStaticPaths() {
  return localeStaticPaths;
}

const locale = getLocaleFromPathOrThrow(Astro.url.pathname);
const t = translate(locale);
---

<Page title={t(tPage, { key: 'title' })}>
  <section>
    <h1>{t(tPage, { key: 'title' })}</h1>
    <p set:html={t(tPage, { key: 'message' })} />
  </section>
</Page>